
pkgname=zlib
pkgver=1.2.11
pkgrel=1
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
arch=('x86_64')
license=('custom')
url="http://www.zlib.net/"
depends=('glibc')
source=("http://zlib.net/current/zlib-${pkgver}.tar.gz")
md5sums=('1c9f62f0778697a09d36121ead88e08e')

build() {
	cd zlib-${pkgver}
	
	./configure --prefix=/usr
	make

	grep -A 24 '^  Copyright' zlib.h > LICENSE
	
	cd contrib/minizip
	
	autoreconf --install
	./configure --prefix=/usr
	make
}

check() {
	cd zlib-${pkgver}
	
	make test
}

package() {
	cd zlib-${pkgver}
	
	make install DESTDIR=${pkgdir}
	install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/zlib/LICENSE
	
	cd contrib/minizip
	make install DESTDIR=${pkgdir}
}
